#ifndef PROPERTIES_H
#define PROPERTIES_H

#include <windows.h>
#include <vector>

class Button;

class PropertiesBox
{
public:
	PropertiesBox();
	virtual ~PropertiesBox();

	bool SetupImages();
	bool Setup(HWND a_hWnd, HINSTANCE a_hInst, int a_xPos, int a_yPos, int a_width, int a_height);

	HWND GetHandle() { return m_hWnd; }
	Button* GetButton(int a_rowIndex);

	void PaintAlternating(HWND a_hWnd);
	void EraseAlternatingBackground(HWND a_hWnd, HDC a_hdc);
	COLORREF ColorShade(COLORREF a_cf, float a_percent);


	void Sort();
	bool DeleteColumn(int a_index);
	bool DeleteRow(int a_index);
	bool DeleteAll();

	void AddColumn(int a_width, const char* a_pLabel);
	void AddRow(const char* a_pLabel, int a_groupID);
	void AddButton(char* a_pLabel, char* a_pTooltip, int a_rowIndex, int a_subItemIndex);
	void AddGroup(char* a_pLabel, int a_groupID);

	void SetItemText(int a_row, int a_col, char* a_pLabel);

private:

	HWND m_hWnd;
	HWND m_hParentWnd;

	int m_colCount;
	int m_rowCount;

	typedef std::pair<int, Button*> ButtonRowPair;
	std::vector<ButtonRowPair> m_buttons;
};

#endif //PROPERTIES_H